/**
 * 2015-12-22
 * CourseBean.java
 * author:sherlochao
 */
package com.sherlochao.beans;

import java.util.ArrayList;
import java.util.List;

import com.sherlochao.model.Student;
import com.sherlochao.model.StudyCourse;
import com.sherlochao.model.Teacher;

/**
 * @author yinchao
 *
 */
public class CourseBean {
	private String courseId;
	
	private String courseName;
	
	private int count;
	
	private ArrayList<String> studentNames = new ArrayList<String>() ;
	
	private ArrayList<Double> scores = new ArrayList<Double>() ;
	
	private ArrayList<String> teacherNames = new ArrayList<String>() ;

	public String getCourseId() {
		return courseId;
	}

	public void setCourseId(String courseId) {
		this.courseId = courseId;
	}

	public String getCourseName() {
		return courseName;
	}

	public void setCourseName(String courseName) {
		this.courseName = courseName;
	}

	public int getCount() {
		return count;
	}

	public void setCount(int count) {
		this.count = count;
	}

	public ArrayList<String> getStudentNames() {
		return studentNames;
	}

	public void setStudentNames(List<Student> students) {
		for(int i = 0; i < students.size(); i++){
			this.studentNames.add(students.get(i).getStudentName());
		}
	}

	public ArrayList<Double> getScores() {
		return scores;
	}

	public void setScores(List<StudyCourse> studyCourses) {
		for(int i = 0; i < studyCourses.size(); i++){
			this.scores.add(studyCourses.get(i).getScore());
		}
	}

	public ArrayList<String> getTeacherNames() {
		return teacherNames;
	}

	public void setTeacherNames(List<Teacher> teachers) {
		for(int i = 0; i < teachers.size(); i++){
			this.teacherNames.add(teachers.get(i).getTeacherName());
		}
	}
	
	

}
